package cn.psvmc.cxzapi.model.system;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户表
 * @Author auto
 * @Date 2024-08-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_user")
public class TUser implements Serializable {

    //用户id
    @TableId(value = "userid", type = IdType.AUTO)
    private Integer userid;

    //用户名
    @TableField("username")
    private String username;

    //手机号
    @TableField("userphone")
    private String userphone;

    //密码
    @TableField("loginpwd")
    private String loginpwd;

    //用户类型（1平台用户 2商家用户）
    @TableField("usertype")
    private Integer usertype;

    //是否锁定（0未锁定1已锁定）
    @TableField("userlock")
    private Integer userlock;

    //所属商家
    @TableField("storeid")
    private Integer storeid;

    //是否删除0未删除1已删除
    @TableLogic
    @TableField("deleted")
    private Integer deleted;

    //说明
    @TableField("comm")
    private String comm;

    //创建人id
    @TableField(value = "createid", fill = FieldFill.INSERT)
    private Integer createid;

    //创建时间
    @TableField(value = "createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    //操作人id
    @TableField(value = "updateid", fill = FieldFill.INSERT_UPDATE)
    private Integer updateid;

    //操作时间
    @TableField(value = "updatetime", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatetime;

    //版本号
    @TableField("rversion")
    @Version
    private Integer rversion;

    @TableField(exist = false)
    //验证码
    private String msgcode;

    @TableField(exist = false)
    //角色id
    private List<Integer> roleIds;


}
